import { createStore, applyMiddleware } from 'redux'
import { reducer } from './actions'
import createSagaMiddleware from 'redux-saga'
import logger from 'redux-logger'
import rootSaga from './saga'
const sagaMid = createSagaMiddleware()
const store = createStore(reducer, applyMiddleware(sagaMid, logger))
sagaMid.run(rootSaga)
// 用于创建仓库并导出
export default store